import Vue from 'vue'
import VueRouter from 'vue-router'
import ProductView from "@/views/ProductView";
import PostView from "@/views/PostView";
import DickView from "../views/DickView";
import LoginView from "@/views/LoginView";
import TreeView from "@/views/TreeView";
import UsersView from "@/views/UsersView";
import RuoyiView from "@/views/RuoyiView";
import CropView from "@/views/CropView";
import ZeroView from "@/views/ZeroView";
import sectionView from "@/views/SectionView";
import LogsView from "@/views/LogsView";
import DepositsView from "@/views/DepositsView";
import PutStashView from "@/views/PutStashView";
import GoodsView from "@/views/GoodsView";
import ProvokeView from "@/views/ProvokeView";
import AddProView from "@/views/AddProView";
import ControlsLogsView from "@/views/ControlsLogsView";
import WebSocketView from "@/views/WebSocketView";
import ParamView from "@/views/ParamView";
import RoleView from "@/views/RoleView";
import NotifisView from "@/views/NotifisView";
import StashView from "@/views/StashView";
import ProcessView from "@/views/ProcessView";



Vue.use(VueRouter)

const routes = [
    {
        path: '/tree',
        name: 'tree',
        component: TreeView,
        children: [
            {
                path: '/product',
                name: 'product',
                component: ProductView
            },
            {
                path: '/users',
                name: 'users',
                component: UsersView,
                children: [
                    {
                        path: '/ruoyi',
                        name: 'RuoyiView',
                        component: RuoyiView
                    },
                    // {
                    //     path: '/nonghu',
                    //     name: 'NonghuView',
                    //     component: NonghuView
                    // },
                ]
            },
            {
                path: '/crop',
                name: 'CropView',
                component: CropView
            },
            {
                path: '/post',
                name: 'post',
                component: PostView
            },
            {
                path: '/dick',
                name: 'dick',
                component: DickView
            },
            {
                path: '/zero',
                name: 'ZeroView',
                component: ZeroView
            },
            {
                path: '/section',
                name: 'section',
                component: sectionView
            },
            {
                path: '/product',
                name: 'product',
                component: ProductView
            },
          {
            path: '/logs',
            name: 'logs',
            component: LogsView
          },
            {
                path: '/deposits',
                name: 'deposits',
                component: DepositsView
            },
            {
                path: '/controlsLogs',
                name: 'ControlsLogsView',
                component: ControlsLogsView
            },
            {
                path: '/param',
                name: 'ParamView',
                component: ParamView
            },
            {
                path: '/role',
                name: 'RoleView',
                component: RoleView
            },
            {
                path: '/notifis',
                name: 'NotifisView',
                component: NotifisView
            },
            {
                path: '/section',
                name: 'sectionView',
                component: sectionView
            },
            {
                path: '/stash',
                name: 'StashView',
                component: StashView
            },
            {
                path: '/process',
                name: 'ProcessView',
                component: ProcessView
            },
            {
                path: '/provoke',
                name: 'ProvokeView',
                component: ProvokeView
            },
            {
                path: '/goods',
                name: 'GoodsView',
                component: GoodsView
            },
            {
                path: '/putStash',
                name: 'PutStashView',
                component: PutStashView
            },
            {
                path: '/addpro',
                name: 'AddProView',
                component: AddProView
            },
            {
                path: '/websocket',
                name: 'websocket',
                component: WebSocketView
            },
        ]
    },
    {
        path: '/login',
        name: 'LoginView',
        component: LoginView
    },







]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
